1. Field of the Invention
This invention relates to a data processor and more particularly, to a data processor which designs an address value.
2. Description of the Prior Art
Considering the relation between an arithmetic operation and the flags affected by performing the operation in a conventional data processor, the conventional processor executes a single instruction that operates on both signed and unsigned binary numbers. There is a first relationship between the flag and single instruction when the operand is deemed to be a signed number and a separate relationship when the operand is deemed to be an unsigned number. The conventional processor reflects in the flags the results of an operation both when the operand is deemed to be a signed number and an unsigned number where the flags have independent meaning depending on whether the operands are deemed to be signed or unsigned numbers.
In the conventional data processor a small number of flags have independent meanings and in some cases the status of an operation result cannot be determined unless two or more flags are simultaneously visible. For example, when overflow occurs when a signed addition instruction is executed, there is no flag which correctly represents whether the result is positive or negative. Also, if overflow occurs in an unsigned subtraction instruction, there is no flag which correctly represents whether the result is positive or negative.
Next, the change in status flags in a conventional processor when a destination location has a small number of bits is considered. When the size of the destination is smaller than the result of a bit string operation or of the size of a source operand, the bit not stored is neglected. In the conventional processor, the bit not stored when the size of the destination operand is smaller than the result of a floating-point operation or of the size of a source operand is rounded off by a predetermined rule. When the conventional processor is operating on integers, surplus operations are required to check whether the integer value remains correct even when stored in a smaller destination. When performing bit sequence operations the stored or not stored bit may be outside the byte boundary, therefore further complicating the check.